package demo.swing;

/**
 * 
 * @author MAbernethy
 */
public class Flight
{
	private String flightNum;
	private String departure;
	private String destination;
	private String aerportDepartureId;
	private String aerportDestinationId;
	private String date;
	private String ticketsOnBisnesClass;
	private String ticketsOnEconomClass;
	private String timeOfDeparture;
	private String timeInFlight;
	
	public String getAerportDepartureId() {
		return aerportDepartureId;
	}

	public void setAerportDepartureId(String aerportDepartureId) {
		this.aerportDepartureId = aerportDepartureId;
	}

	public String getAerportDestinationId() {
		return aerportDestinationId;
	}

	public void setAerportDestinationId(String aerportDestinationId) {
		this.aerportDestinationId = aerportDestinationId;
	}

	public String getTimeOfDeparture() {
		return timeOfDeparture;
	}

	public void setTimeOfDeparture(String timeOfDeparture) {
		this.timeOfDeparture = timeOfDeparture;
	}

	public String getTimeInFlight() {
		return timeInFlight;
	}

	public void setTimeInFlight(String timeInFlight) {
		this.timeInFlight = timeInFlight;
	}

	public boolean equals(Object o)
	{
		Flight f = (Flight)o;
		return departure.equals(f.getDeparture()) 
		&& destination.equals(f.getDestination()) 
		&& flightNum.equals(f.getFlightNum());
	}
	
	public String getTicketsOnBisnesClass() {
		return ticketsOnBisnesClass;
	}

	public void setTicketsOnBisnesClass(String ticketsOnBisnesClass) {
		this.ticketsOnBisnesClass = ticketsOnBisnesClass;
	}

	public String getTicketsOnEconomClass() {
		return ticketsOnEconomClass;
	}

	public void setTicketsOnEconomClass(String ticketsOnEconomClass) {
		this.ticketsOnEconomClass = ticketsOnEconomClass;
	}

	public String getDeparture()
	{
		return departure;
	}
	public String getDate()
	{
		return date;
	}

	public String getDestination()
	{
		return destination;
	}


	public void setDeparture(String string)
	{
		departure = string;
	}
	public void setDate(String string)
	{
		date = string;
	}

	public void setDestination(String string)
	{
		destination = string;
	}



	public String getFlightNum()
	{
		return flightNum;
	}

	public void setFlightNum(String i)
	{
		flightNum = i;
	}
	public String toString(){
		String res = "";
		res += "Flight number: " + getFlightNum() + "\n";
		res += "Date: " + getDate() + "\n";
		res += "Departure: " + getDeparture() + "\n";
		res += "Destination: " + getDestination() + "\n";
		res += "Bisnes class tickets: " + getTicketsOnBisnesClass() + "\n";
		res += "Econom class tickets: " + getTicketsOnEconomClass() + "\n";
		res += "Departure Aerport: " + getAerportDepartureId() + "\n";
		res += "Destination Aerport: " + getAerportDestinationId() + "\n";
		res += "Time of departure: " + getTimeOfDeparture() + "\n";
		res += "Time in flight: " + getTimeInFlight() + "\n";
		return res;
	}

}
